import React from 'react'
import { Avatar, Menu, Icon,Dropdown } from 'antd';
import style from './UserAvatar.css'

const menu = (
    <Menu>
      <Menu.Item>
        <a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">个人信息</a>
      </Menu.Item>
      <Menu.Item>
        <a target="_blank" rel="noopener noreferrer" href="192.168.2.73:3010/account/logout">退出登录</a>
      </Menu.Item>
      
    </Menu>
  );

class UserAvatar extends React.Component{
    constructor(props){
        super(props)
        this.state = {
            
        };
    }
 
    componentWillMount() {
      
      
    }
    render() {
      return (
        <div className={style['avatar-container']}>
            <div className={style.dropdown}>
                <Dropdown overlay={menu}>
                    <a className="ant-dropdown-link" href="#">
                        <Icon type="ellipsis" />
                    </a>
                </Dropdown>
            </div>
            <div >
                <Avatar size="large" className={style.avatar} src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
                <div className={style.username} >
                    {mapBoomUser.username}
                </div>
                {/* <div>
                    角色名称
                </div> */}
            </div>
        </div>
      );
    }
}

export default UserAvatar
